package com.glory.hikvisionmobile.bean.DataCollect;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * @author yi.zhang
 * @date 2019/12/10
 * @desc
 */
public class XPdaComponentBean implements Parcelable {

    private String componentId;

    private String state;

    private String isSelected;

    public String getComponentId() {
        return componentId == null ? "" : String.valueOf(componentId);
    }

    public void setComponentId(String componentId) {
        this.componentId = componentId;
    }

    public String getState() {
        return state == null ? "" : String.valueOf(state);
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getIsSelected() {
        return isSelected == null ? "N" : String.valueOf(isSelected);
    }

    public void setIsSelected(String isSelected) {
        this.isSelected = isSelected;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.componentId);
        dest.writeString(this.state);
        dest.writeString(this.isSelected);
    }

    public XPdaComponentBean() {
    }

    protected XPdaComponentBean(Parcel in) {
        this.componentId = in.readString();
        this.state = in.readString();
        this.isSelected = in.readString();
    }

    public static final Parcelable.Creator<XPdaComponentBean> CREATOR = new Parcelable.Creator<XPdaComponentBean>() {
        @Override
        public XPdaComponentBean createFromParcel(Parcel source) {
            return new XPdaComponentBean(source);
        }

        @Override
        public XPdaComponentBean[] newArray(int size) {
            return new XPdaComponentBean[size];
        }
    };
}
